package business;

import java.util.List;

import persistence.CostUnit;
import persistence.CostUnitDAO;
import persistence.LibraryLocation;
import persistence.PredefinedEntry;
import persistence.PredefinedEntryDAO;
import persistence.PredefinedParam;
import persistence.PredefinedParamDAO;
import persistence.Purchaser;
import persistence.PurchaserDAO;
import persistence.Subscription;
import persistence.SubscriptionDAO;
import persistence.SubscriptionDAOTestImpl;
import persistence.Supplier;
import persistence.SupplierDAO;
import persistence.User;
import persistence.exception.DAOException;
import business.exception.BusinessException;
import business.validation.BusinessValidator;

public class SubscriptionLogicTestImpl implements SubscriptionLogic {
	private SubscriptionDAO subscriptionDAO;
	private PurchaserDAO purchaserDAO;
	private SupplierDAO supplierDAO;
	
	public SubscriptionLogicTestImpl() {
		subscriptionDAO = new SubscriptionDAOTestImpl();
	}

	@Override
	public void setSubscriptionDAO(SubscriptionDAO subscriptionDAO) {
		this.subscriptionDAO = subscriptionDAO;
	}

	@Override
	public SubscriptionDAO getSubscriptionDAO() {
		return this.subscriptionDAO;
	}
	@Override
	public void setPurchaserDAO(PurchaserDAO purchaserDAO) {
		this.purchaserDAO = purchaserDAO;
		
	}

	@Override
	public PurchaserDAO getPurchaserDAO() {
		return this.purchaserDAO;
	}

	@Override
	public void setSupplierDAO(SupplierDAO supplierDAO) {
		this.supplierDAO = supplierDAO;
	}

	@Override
	public SupplierDAO getSupplierDAO() {
		return this.supplierDAO;
	}
	@Override
	public void setUserManager(UserManager userManager) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public UserManager getUserManager() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void setCommonLogic(CommonLogic commonLogic) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public CommonLogic getCommonLogic() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setBusinessValidator(BusinessValidator<Subscription> validator) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public BusinessValidator<Subscription> getBusinessValidator() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Subscription> getAllSubscriptionsWithTitleForLibraryLocation(String title, LibraryLocation location)
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Subscription> getAllSubscriptionsWithTitle(String title)
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public List<Subscription> getAllSubscriptions() throws BusinessException {
		List<Subscription> subscriptions = null;
		try {
			subscriptions = subscriptionDAO.getAllSubscriptionsAsc();
		} catch (DAOException e) {
			throw new BusinessException(e.getMessage());
		}
		return subscriptions;
	}

	@Override
	public List<Subscription> getAllSubscriptionsForLibraryLocation(LibraryLocation location)
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Subscription findGivenSubscription(int id) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Subscription getNewEmptySubscription() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Subscription saveNewSubscription(Subscription sub)
			throws BusinessException {
		Subscription createdSubscription = null;
		try {
			createdSubscription = this.subscriptionDAO.saveSubscription(sub);
		} catch (DAOException de) {
			throw new BusinessException("Error saving new Subscription: " + sub, de);
		}
		return createdSubscription;
	}

	@Override
	public List<PredefinedEntry> getSubscriptionStates()
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setPredefinedEntryDAO(PredefinedEntryDAO DAO) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public PredefinedEntryDAO getPredefinedEntryDAO() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setPredefinedParamDAO(PredefinedParamDAO predefParamDAO) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public PredefinedParamDAO getPredefinedParamDAO() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<PredefinedEntry> getAllKindsOfAcquisition()
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<CostUnit> getCostUnitsForLibraryLocation(LibraryLocation location) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<CostUnit> getCostUnits() throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<PredefinedEntry> getAllCurrencies()
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public List<Purchaser> getAllPurchasers() throws BusinessException {
		//TODO: method stub
		return null;
	}

	@Override
	public List<Purchaser> getAllPurchasersForLibraryLocation(
			LibraryLocation libraryLocation) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}	

	@Override
	public List<Supplier> getAllSuppliers() throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setCostUnitDAO(CostUnitDAO costUnitDAO) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public CostUnitDAO getCostUnitDAO() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void updateSubscription(Subscription subscription)
			throws BusinessException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Purchaser getPurchaserById(int id) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Supplier getSupplierById(int id) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}
}
